﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace KTSonline
{
    public partial class Article : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Global.currentpage = Global.Pages.Article;

            if (Request.QueryString["id"] == null)
                Response.Redirect("Default.aspx");
            int id = 0;
            try
            {
                id = Int32.Parse(Request.QueryString["id"]);
            }
            catch
            {
                Response.Redirect("Default.aspx");
            }
            KTSonlineDataContext db = new KTSonlineDataContext();
            var rs = db.BAI_VIETs.Where(bv => bv.id == id);
            if(rs.Count() == 0)
                Response.Redirect("Default.aspx");
            Repeater1.DataSource = rs;
            Repeater1.DataBind();

        }
    }
}
